package com.haredot.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.time.Duration;

@ConfigurationProperties("jwt.config")
public class JwtProperties {
    /**
     * 私钥
     */
    private String key = "&^24ag623^23@";
    /**
     * 签发者
     */
    private String iss = "haredot";
    /**
     * 过期时间
     */
    private Duration expired = Duration.ofMinutes(5);
    /**
     * 刷新令牌过期时间
     */
    private Duration refreshExpired = Duration.ofDays(1);

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getIss() {
        return iss;
    }

    public void setIss(String iss) {
        this.iss = iss;
    }

    public Duration getExpired() {
        return expired;
    }

    public void setExpired(Duration expired) {
        this.expired = expired;
    }

    public Duration getRefreshExpired() {
        return refreshExpired;
    }

    public void setRefreshExpired(Duration refreshExpired) {
        this.refreshExpired = refreshExpired;
    }

}
